package com.bonana.core.services;

import com.bonana.core.entity.CoreUser;
import com.bonana.core.entity.CoreUserProfile;
import com.bonana.core.entity.mybatis.Boboplan;
import com.bonana.core.entity.mybatis.IndexBo;
import com.bonana.core.form.BoPlanFrom;
import com.bonana.core.form.UserForm;
import com.bonana.core.form.UserSingleFieldFrom;
import com.bonana.core.vo.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * Created by Administrator on 2016/6/27.
 */
public interface BoBoService {
    int AddBobo(CoreUser user);
    int DelBoboById(int userId);
    int updateDynamicPwd(String username);
    int resetPwd(String username, String pwd, String dpwd);
    CoreUser getBoboById(int boboId);
    List<CoreUserProfile> getBobos(int pgNum, int pgSize, String sortType, String query, Integer owner, Integer platformId);

    List<CoreUserProfile> getIndexBobos(int cnt);
    List<CoreUserProfile> getHotBobos(int cnt);
    List<CoreUserProfile> getNewestBobos(int cnt);

    List<CoreUserProfile> queryAllBoUser();
    int RemoveFromIndex(int userId);
    int AddToIndex(IndexBo userId);
    UserProfileVO saveUser(UserForm userForm , String remoteAddress);
    UserProfileVO saveUserProfile(UserForm userForm);
    UserLoginVO login(String username, String password, String requestRemoteAddr);
    AvatarVo updateUserAvatar(int uid, MultipartFile avatarFile);
    int updateSingleField(int uid, UserSingleFieldFrom fieldFrom);

    UserCardVO queryUserCardByUid(int uid, int fromUid, Long ts);
    CoreUserProfile queryUserProfileByUid(int uid, Long ts);
    UserBaseProfileListVO getUserProfileByUids(String uids);

    int addFavor(int fromUid, int boid);
    int unFavor(int fromUid, int boid);
    int addFollow(int fromUid, int boid);
    int unFollow(int fromUid, int boid);

    List<Boboplan> getBoboPlan(int uid);
    List<BoPlanVo> getBoboPlanDisplay(int uid);
    Boboplan SaveBoboPlan(BoPlanFrom form);
    int RemovePlan(int planId);
    Boboplan getBoPlanById(int boplanId);

    int addComment(int boid, int uid, int parrendId, String content);
    List<BoCommentVo> getBoComments(int boid, int pgNum, int pgSize);

    List<SiteStausVo> getActiveUserStatus();
    List<SiteStausVo> getActiveBoBoStatus();
    List<SiteStausVo> getNewUsers();
    List<SiteStausVo> getNewComments();

    OperStatusVO getRelation(int boid, int uid);
}
